import http from './http'
import qs from 'qs'

const userConfig = {
    transformRequest: [
        function (data) {
            return qs.stringify(data);
        }
    ],
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
    }
};
const selectCommodityList = params => http('post', '/api/getAllCommodity', params,userConfig)
const deleteCommodity = params => http('post', '/api/deleteCommodity', params,userConfig)
const updateCommodity = params => http('post', '/api/updateCommodity', params,userConfig)
const addCommodity = params => http('post', '/api/saveCommodity', params,userConfig)
// const selectList = params => http('post', '/api/v1/user/list', params)

export {selectCommodityList, deleteCommodity, updateCommodity,addCommodity}